home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.7 KB | 48 lines | [TEXT/GEOL] |
- Item 8883801 8-Dec-90 09:04
-
- From: MIKE.BLACKWELL@ROVER.RI.CMU.EDU@INTERNET#
-
- To: MACAPP.TECH$ MacApp Technical
-
- INTERNET# Document Id: <660693876/mkb@ROVER.RI.CMU.EDU>
-
- ------------------------------------------------------------------------------
-
- Sub: Adding text to TEView
-
- TO REPLY, use: Mike.Blackwell@ROVER.RI.CMU.EDU@INTERNET#
- Using the reply function in AppleLink does not work for gatewayed E-mail yet.
-
- From: Mike.Blackwell@ROVER.RI.CMU.EDU
- To: macapp.tech$@applelink.apple.com
-
- AppleLink reply to: mkb@rover.ri.cmu.edu@INTERNET#
-
- I'm working on an application that requires a console window logging
- various text status messages generated externally. I thought I'd use a
- TEView, so I'd get cut/paste, printing and styles for free. (I tried
- TTranscriptView, but couldn't get it to do what I wanted short of
- re-writing it). My problem is appending a text message to the TEView:
-
- pascal void TConsoleDocument::AddText(char *theText)
- {
- int textLen;
-
- textLen = strlen(theText);
- if ((fConsoleView->fMaxChars - GetHandleSize(fTextHandle)) < textLen) {
- StdAlert(phTooManyChars);
- return;
- }
- TEInsert(theText, textLen, fConsoleView->fHTE);
- fConsoleView->RecalcText();
- fConsoleView->SynchView(true);
- }
-
- This works, but the display in the window gets screwed up when it
- reachs the bottom and needs to scroll - tops of lines get chopped off,
- and some lines don't show up at all. Forcing an update (say by covering
- then uncovering the window) fixes the drawing. Any ideas what I'm doing
- wrong here (or a better way to do it)?
-
- thanks, Mike Blackwell mkb@rover.ri.cmu.edu
-